home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 October
/
Macworld (1998-10).dmg
/
Updaters
/
CINEMA 4D XL 5.21
/
NewFeaturesExamples
/
Plugins
/
Interpolation.cof
next >
Wrap
Text File
|
1998-07-14
|
866b
|
51 lines
SetIVal(doc,val)
{
var mp,i,ci=new(array,12);
if (!ci) return;
ci[ 0] = new(ColorInfo);
ci[ 1] = new(LuminanceInfo);
ci[ 2] = new(TransparencyInfo);
ci[ 3] = new(ReflectionInfo);
ci[ 4] = new(EnvInfo);
ci[ 5] = new(FogInfo);
ci[ 6] = new(BumpInfo);
ci[ 7] = new(GenlockInfo);
ci[ 8] = new(HighlightInfo);
ci[ 9] = new(HColorInfo);
ci[10] = new(GlowInfo);
ci[11] = new(DisplacementInfo);
for (mp = doc->GetFirstMaterial(); mp; mp=mp->GetNext())
{
for (i=0; i<12; i++)
{
if (!ci[i]) continue;
if (mp->GetChannelInfo(ci[i]))
{
ci[i]->inter = val; // Set new interpolation type
mp->SetChannelInfo(ci[i]);
}
}
}
return TRUE;
}
SetMIP(doc)
{
SetIVal(doc,6);
}
SetSAT(doc)
{
SetIVal(doc,7);
}
main()
{
RegisterMenuHook("Adjust MIP Mapping","SetMIP");
RegisterMenuHook("Adjust SAT Mapping","SetSAT");
return TRUE;
}